<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core">

<h:head>
    <title>Login</title>
    <h:outputStylesheet library="css" name="style.css" />
</h:head>

<h:body>
    <f:view locale="#{languageBean.currentLocale}">
        <br />
        <h:outputText value="#{msg.guestbook_login}" styleClass="h1" />
        <br />
        <h:messages styleClass="h2" />
        <br />
        <h:form>
            <h:panelGrid columns="2">
                <h:commandLink action="#{languageBean.changeLocale('de_DE')}">
                    <h:graphicImage library="img" name="german.jpg" />
                </h:commandLink>
                <h:commandLink action="#{languageBean.changeLocale('en')}">
                    <h:graphicImage library="img" name="english.jpg" />
                </h:commandLink>
            </h:panelGrid>
        </h:form>
        <h:form>
            <h:panelGrid columns="2">
                <h:outputText value="#{msg.guestbook_login_username}" styleClass="h3" />
                <h:inputText id="username" label="username" value="#{loginBean.username}" required="true" requiredMessage="#{msg.guestbook_login_username_required}" />
                <h:outputText value="#{msg.guestbook_login_password}" styleClass="h3" />
                <h:inputSecret id="password" label="password" value="#{loginBean.password}" required="true" requiredMessage="#{msg.guestbook_login_password_required}" />
            </h:panelGrid>
            <br />
            <h:commandButton action="#{loginBean.login}" value="#{msg.guestbook_login_action_login}" />
        </h:form>
    </f:view>
</h:body>

</html>
